<script src="jquery-1.10.1.min.js" type="text/javascript"></script>

<script type="text/javascript">

  jQuery(document).ready(function(){
    $('#uname1Id').on('keyup',function(){
var val1 = $(this).val();
$('#uname2Id').val(val1)
    });
  });

</script>

<span id="copyId">Copy</span>
<hr>

<input
type="text"
name="uname1"
id="uname1Id" />

<hr>

<input
type="text"
name="uname2"
id="uname2Id" />
